<?php
include dirname(dirname(__FILE__)) . "/conf.php";
include SERVER_ROOT . 'func/ip.php';

// 获取http参数
$ip = post_str('ip');

// 初始化返回值
$status = 'fail';
$error = '';
$area = '';

if ($ip !== false){
    $status = 'succ';
    $area = convertip($ip);
}

echo json_encode(array('status' => $status, 'error' => $error, 'area' => $area));
